﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dbPoll_Application.Models.ChangePersonalDetailsModel>" %>

    <% Html.ValidationSummary(true); %>
    <p>To change your personal details fill in the form below.</p>
    <table>
    <tr>
    <td><label>First Name:</label></td>
    <td><%= Html.TextBoxFor(model => model.FirstName)%></td>
    <td><%= Html.ValidationMessageFor(model => model.FirstName)%></td>
    </tr>
    <tr>
    <td><label>Last Name:</label></td>
    <td><%= Html.TextBoxFor(model => model.LastName)%></td>
    <td><%= Html.ValidationMessageFor(model => model.LastName)%></td>
    </tr>
    <tr>
    <td><label><span style="color: Red;">*</span>Email:</label></td>
    <td><%= Html.TextBoxFor(model => model.Email)%></td>
    <td><%= Html.ValidationMessageFor(model => model.Email)%></td>
    </tr>
    <tr>
    <td><label>Gender:</label></td>
    <td>
        <%= Html.RadioButtonFor(model => model.Gender, dbPoll_Application.Models.Gender.Male)%><label for="Male">Male</label>&nbsp;&nbsp;
        <%= Html.RadioButtonFor(model => model.Gender, dbPoll_Application.Models.Gender.Female)%><label for="Female">Female</label>
    </td>
    <td><%= Html.ValidationMessageFor(model => model.Gender)%></td>
    </tr>
    <tr>
    <td><label>Position:</label></td>
    <td><%= Html.TextBoxFor(model => model.Position)%></td>
    <td><%= Html.ValidationMessageFor(model => model.Position)%></td>
    </tr>
    <tr>
    <td><label>City:</label></td>
    <td><%= Html.TextBoxFor(model => model.City)%></td>
    <td><%= Html.ValidationMessageFor(model => model.City)%></td>
    </tr>
    <tr>
    <td><label>Country:</label></td>
    <td><%= Html.TextBoxFor(model => model.Country)%></td>
    <td><%= Html.ValidationMessageFor(model => model.Country)%></td>
    </tr>
    <tr>
    <td><input type="submit" id="submit" value="Save"/></td>
    <td><span id="spinner" style="display:none"><img src="../Resources/ajax-loader.gif" /></span><span id="spinnermsg" style="display:none"> Saving...</span><span id="validationsummary" style="display:none"><%= Html.ValidationSummary(true)%></span></td>
    </tr>
    </table>
